const packageName = "com.jky.filesystem";
export const serverName = {
    server:"BallServiceAbility",
};

export class PAObj {
    bundleName;
    abilityName;
    constructor(name) {
        this.bundleName = packageName;
        this.abilityName = packageName + "." + name;
    }
    callAbility(code, data='') {
        let action = {
                 bundleName: this.bundleName,
                 abilityName: this.abilityName,
                 messageCode: code,
                 data: data,
                 abilityType: 0,
                 syncOption: 0
             }
        return FeatureAbility.callAbility(action);
//        return false;
    }
    subscribeAbilityEvent(code,data='',callback) {
        let action = {
                 bundleName: this.bundleName,
                 abilityName: this.abilityName,
                 messageCode: code,
                 data: data,
                 abilityType: 0,
                 syncOption: 0
             }
        return FeatureAbility.subscribeAbilityEvent(action,callback);
//        return false;
    }
    unsubscribeAbilityEvent(code) {
        let action = {
             bundleName: this.bundleName,
             abilityName: this.abilityName,
             messageCode: code,
             data: '',
             abilityType: 0,
             syncOption: 0
         }
        return FeatureAbility.unsubscribeAbilityEvent(action);
//        return false;
    }
}